<!DOCTYPE html>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:dataTable id="owner_product_picture" value="#{searchc.product.user.userPictures}" var="up">
        <h:column>
            <h:graphicImage value="#{up.picture}" />    
        </h:column>
    </h:dataTable>
    <h1>
        <h:outputText value="#{searchc.product.user.person.name}" />
        <h:outputText value=" " />
        <h:outputText value="#{searchc.product.user.person.surname}" />
    </h1>
    <h:outputLink value="mailto:#{searchc.product.user.email}">#{searchc.product.user.email}</h:outputLink>
    
    <h:dataTable id="owner_social_networks" value="#{searchc.product.user.userSocialNetworks}" var="usn">
        <h:column>
            <h:outputLink value="#{usn.link}">
                <h:graphicImage value="#{usn.socialNetwork.name == 'Facebook' ? '/resources/image/social/facebook_32.png': ''}" />
                <h:graphicImage value="#{usn.socialNetwork.name == 'Google+' ? '/resources/image/social/google_plus_32.png': ''}" />
                <h:graphicImage value="#{usn.socialNetwork.name == 'Twitter' ? '/resources/image/social/twitter_32.png': ''}" />
                <h:graphicImage value="#{usn.socialNetwork.name == 'Website' ? '/resources/image/social/website_32.png': ''}" />
                <h:graphicImage value="#{usn.socialNetwork.name == 'Link' ? '/resources/image/social/link_32.png': ''}" />
            </h:outputLink>
            <h:outputText value="#{usn.socialNetwork.name}" />
            
        </h:column>
    </h:dataTable>

</ui:composition>		